import { getAssetsImage } from "@/utils";
import { ReactNode, memo } from "react";
import ScreenAdapter from "@/components/ScreenAdapter";
import Header from "./header";
import Main from "./main";
import { EchartsThemeContext } from "@/context/echartsTheme";

// 资产目录页面
function DataAsset(): ReactNode {
  return (
    <EchartsThemeContext.Provider value={{
      theme: 'light'
    }}>
      <ScreenAdapter width={1920} height={1080}>
        <div className="w-full h-full" style={{
          background: `url(${getAssetsImage('dataAsset/page-bg.png')}) center center`,
          backgroundSize: `100% 100%`
        }}>
          <Header />
          <Main />
        </div>
      </ScreenAdapter>
    </EchartsThemeContext.Provider>
  )
}

const MemoDataAsset = memo(DataAsset)

export default MemoDataAsset